<template>
  <div class="dongtai">
    <span class="title van-multi-ellipsis--l">
        {{dynamicRecord.content}}
        </span>
    <van-grid :border="false" :column-num="num">
      <van-grid-item v-for="(v,i) in dynamicRecord.imgUrl" :key="i">
        <van-image :src="v" fit="fill" />
      </van-grid-item>
    </van-grid>
  </div>
</template>

<script>
export default {
  props:{
    dynamicRecord:{
      type:Object
    }
  },
  data() {
    return {
      num:3
    }
  },
  mounted(){
    let length=this.$props.dynamicRecord.imgUrl.length
    switch (length) {
      case 1:
        this.num=1
        break;
      case 2:
      case 3:
      case 4:
        this.num=2
        break;
      default:
        this.num=6;
        break;
    }
  }
};
</script>

<style>
.title{
  display: inline-block;
  padding: 0 20px 0 20px;
  font-size: 20px;
}
</style>